#include <iostream>
#include <cstdio>

int main() {
    long long n = 0;
    int sum = 0;
    char c;
    while ((c = getchar())) {
        if ( c == '\n' || c == EOF) {
            if ( n != 0 )
                if ( n % sum == 0 )
                    printf("yes\n");
                else
                    printf("no\n");
            n = 0;
            sum = 0;
            if ( c == EOF) {
                break;
            }


            continue;
        }
        sum += (c - 48);
        n = n * 10 + (c - 48);


    }
    return 0;
}